
define(['common/services','moment'],
    function (services,moment) {
        services.factory('withdrawService', function ($http,$q,Upload,$cacheFactory) {

            return{

                getWithdrawList:function(data,cb) {

                    $http.post('/api/withdraw/getWithdrawList',data).success(function(data){

                        cb(null,data);

                    }).error(function(err){

                        cb(err,null);
                    });
                },

                confirmWithdraw:function(withdrawId,withdrawOrderNo,userId,money,cb){
                    $http.get('/api/withdraw/changeWithdrawStatus?withdrawId='+withdrawId+'&withdrawOrderNo='+withdrawOrderNo+'&userId='+userId+'&money='+money).success(function(data){

                        cb(null,data);

                    }).error(function(err){

                        cb(err,null);
                    });
                }



            }
        });


    });
